package Game.Players.Units;

/**
 * Created by sech_92 on 17.12.2014.
 */
public class FightingFortress extends Unit {
    private int armor = 0;
    Weapons[] weapon = {null, null, null, null};

    private FightingFortress(String _name, int _health, int _armor, TFightingFortress type){
        name = _name;
        health = _health;
        armor = _armor;
        level = 6;
        squadSize = 1;
        Weapons.makeWeaponz(type, weapon);
    }
    public static FightingFortress make(TFightingFortress type){
        FightingFortress constr;
        switch (type) {
            case Land_rider:
                constr = new FightingFortress("Land rider", 1000, 30, type);
                break;
            case Bane_Blade:
                constr = new FightingFortress("Bane Blade", 1000, 30, type);
                break;
            case Squiggoth:
                constr = new FightingFortress("Squiggoth", 1000, 30, type);
                break;
            case Monolith:
                constr = new FightingFortress("Monolith", 1000, 30, type);
                break;
            default:
                constr = new FightingFortress("", 0, 0, null);
                break;
        }
        return constr;
    }

    public int getArmor(){
        return armor;
    }

    public void decreaseArmor(int a){
        armor -= (a < 0 ? 0 : a);
    }

}
